import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getDetailAPI } from '@/apis/detail'
export const useDetailStore = defineStore('detail', () => {
	const goods = ref({})
	const getGoods = async (id) => {
		const res = await getDetailAPI(id).then(res => res.data);
		goods.value = res.result;
	}
	return {
		goods,
		getGoods
	}
})